/**
 * api管理
 */
import request from './../utils/request'
export default {
    login(params) {
        return request({
            //url: '/users/login',
            url: '/user/login',
            method: 'post',
            data: params,
        })
    },
    getMenuList() {
        return request({
            url: '/user/getMenu',
            method: 'get',
            data: {}
        })
    },

    // 月工资结构管理
    getMouthTypeList(params) {
        return request({
            url: '/mouthType/findList',
            method: 'post',
            data: params
        })
    },
    // 月工资结构管理添加
    addMouthType(params) {
        return request({
            url: '/mouthType/create',
            method: 'post',
            data: params
        })
    },
    // 月工资结构管理修改
    updateMouthType(params) {
        return request({
            url: '/mouthType/update',
            method: 'post',
            data: params
        })
    },
    // 月工资结构管理删除
    findMonthTypeById(id) {
        return request({
            url: '/mouthType/findById/' + id,
            method: 'get',
            data: {}
        })
    },
    // 月工资结构管理详情
    deleteMouthType(id) {
        return request({
            url: '/mouthType/delete/' + id,
            method: 'get',
            data: {}
        })
    },
    generate(id) {
        return request({
            url: '/mouthType/generate/' + id,
            method: 'get',
            data: {}
        })
    },
    // 获取所有工资类型字段
    getSalaryFieldAll(id) {
        return request({
            url: '/SalaryType/getSalaryFieldAll',
            method: 'get',
            data: {}
        })
    },

    // 工资查询
    getSalaryList(params) {
        return request({
            url: '/salary/getSalaryList',
            method: 'post',
            data: params
        })
    },
    // 字段查询
    getSalaryFiled(params) {
        return request({
            url: '/salary/getSalaryFiled',
            method: 'post',
            data: params
        })
    },


    // 统计
    // 按照年月统计工资总数
    getSalaryStatisticsByYearAndMonth() {
        return request({
            url: '/salaryStatistics/getSalaryStatisticsByYearAndMonth',
            method: 'get',
            data: {}
        })
    },
    // 按照年统计工资总数
    getSalaryStatisticsByYear() {
        return request({
            url: '/salaryStatistics/getSalaryStatisticsByYear',
            method: 'get',
            data: {}
        })
    },


    // 设置月工资结构
    // 工资类型下拉
    getSalaryTypeList() {
        return request({
            url: '/SalaryType/getSalaryTypeList',
            method: 'get',
            data: {}
        })
    },
    // 列表查询
    getMonthSalaryList(params) {
        return request({
            url: '/monthSalary/getMonthSalaryList',
            method: 'post',
            data: params
        })
    },
    // 设置月工资结构添加
    addMonthSalary(params) {
        return request({
            url: '/monthSalary/create',
            method: 'post',
            data: params
        })
    },
    // 设置月工资结构修改
    updateMonthSalary(params) {
        return request({
            url: '/monthSalary/update',
            method: 'post',
            data: params
        })
    },
    // 设置月工资结构删除
    deleteMonthSalary(id) {
        return request({
            url: '/monthSalary/delete/' + id,
            method: 'get',
            data: {}
        })
    },



	//bwf - SalaryType
	getExpression(params) {
	    return request({
	        url: '/SalaryType/FindAll',
	        method: 'post',
	        data: params
	    })
	},

    userSubmit(params) {
	    return request({
	        url: '/SalaryType/add',
	        method: 'post',
	        data: params
	    })
	},
    salaryFileldDel(params) {
	    return request({
	        url: '/SalaryType/Delete',
	        method: 'post',
	        data: params
	    })
	},
	// FindList(params) {
	//     return request({
    //         url: '/SalaryType/getAll',
	//         method: 'post',
	//         data: params
	//     })
	// },

    FindList(params) {
        return request({
            url: '/SalaryType/getList',
            method: 'post',
            data: params
        })
    },
	
	// - SalaryCalculateEquation
	add(params) {
	    return request({
	        url: '/SalaryCE/add',
	        method: 'post',
	        data: params
	    })
	},
	FindAll(params) {
	    return request({
	        url: '/SalaryCE/FindAll',
	        method: 'post',
	        data: params
	    })
	},
    // FindAll(params) {
    //     return request({
    //         url: '/SalaryType/getTable',
    //         method: 'post',
    //         data: params
    //     })
    // },
	Delete(params) {
	    return request({
	        url: '/SalaryCE/Delete',
	        method: 'post',
	        data: params
	    })
	},
	//查询all
	getAllList() {
	    return request({
	        url: '/SalaryCE/getAllList',
	        method: 'post'
	    })
	},
	// - Salary
	Modify(params) {
	    return request({
	        url: '/salary/add',
	        method: 'post',
	        data: params
	    })
	},
	FindAllSalary(params) {
	    return request({
	        url: '/salary/FindAll',
	        method: 'post',
	        data: params
	    })
	},
	equationQuery(params) {
	    return request({
	        url: '/salary/equationQuery',
	        method: 'post',
	        data: params
	    })
	},
	// -SalaryChangeApply
	salaryCAdd(params) {
	    return request({
	        url: '/SalaryCA/add',
	        method: 'post',
	        data: params
	    })
	},
	salaryCAFindById(params) {
	    return request({
	        url: '/SalaryCA/FindById',
	        method: 'post',
	        data: params
	    })
	},
	salaryCAFindAll(params) {
	    return request({
	        url: '/SalaryCA/FindAll',
	        method: 'post',
	        data: params
	    })
	},
	salaryCAFindAdd(params) {
	    return request({
	        url: '/SalaryCA/add',
	        method: 'post',
	        data: params
	    })
	},
    AddApply(params){
        return request({
            url: '/SalaryCA/add',
            method: 'post',
            data: params
        })
    }
    ,
    FindAllSalaryApply(params){
        return request({
            url: '/SalaryCA/FindAll',
            method: 'post',
            data: params
        })
    },
    userDelSalaryApply(params){
        return request({
            url: '/SalaryCA/Delete',
            method: 'post',
            data: params
        })
    },
    //工资表删除用户
    DeleteCalculate(params) {
        return request({
            url: '/salary/Delete',
            method: 'post',
            data: params
        })
    },
}
